<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title data-i18n="pageTitle.settings">设置</title>
    <link href="lib/css/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="styles.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <script src="js/i18n.js"></script>
    <script src="js/api.js"></script>
    <script src="js/settings.js"></script>
    <style>
        body {
            margin: 0;
            padding: 20px;
            background-color: #f5f5f5;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .modal-content {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 560px;
            padding: 24px;
        }
        .modal-header {
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .modal-header h2 {
            font-size: 1.5rem;
            font-weight: 600;
            color: #333;
            margin: 0;
        }
        .form-group {
            margin-bottom: 20px;
        }
        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #444;
        }
        .form-control {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
        }
        .modal-footer {
            margin-top: 24px;
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }
        .btn {
            padding: 8px 16px;
            border-radius: 4px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }
        .btn-secondary {
            background-color: #f0f0f0;
            color: #333;
        }
        .btn-primary {
            background-color: #1a73e8;
            color: white;
        }
        .btn:hover {
            opacity: 0.9;
        }
        .close-btn {
            background: none;
            border: none;
            font-size: 1.2rem;
            color: #666;
            cursor: pointer;
            padding: 4px;
        }
        .close-btn:hover {
            color: #333;
        }
    </style>
</head>
<body>
    <div class="modal-content">
        <div class="modal-header">
            <h2 data-i18n="settings.title">设置</h2>
            <button id="closeModal" class="close-btn">
                <i class="fas fa-times"></i>
            </button>
        </div>
        <div class="modal-body">
            <div class="form-group">
                <label for="apiUrl" data-i18n="settings.apiUrl">ZABBIX API URL:</label>
                <input type="text" id="apiUrl" class="form-control" placeholder="http://your-zabbix-server/api_jsonrpc.php">
            </div>
            <div class="form-group">
                <label for="apiToken" data-i18n="settings.apiToken">ZABBIX API TOKEN:</label>
                <input type="password" id="apiToken" class="form-control">
            </div>
            <div class="form-group">
                <label data-i18n="settings.refreshInterval">刷新间隔</label>
                <select id="refreshInterval" class="form-select">
                    <option value="5000">5秒</option>
                    <option value="30000">30秒</option>
                    <option value="60000">1分钟</option>
                    <option value="300000" selected>5分钟</option>
                    <option value="600000">10分钟</option>
                    <option value="1800000">30分钟</option>
                </select>
            </div>
        </div>
        <div class="modal-footer">
            <button id="testConnection" class="btn btn-secondary">
                <i class="fas fa-plug"></i>
                <span data-i18n="settings.buttons.test">测试连接</span>
            </button>
            <button id="saveSettings" class="btn btn-primary">
                <i class="fas fa-save"></i>
                <span data-i18n="settings.buttons.save">保存设置</span>
            </button>
        </div>
    </div>
</body>
</html> 